#!/bin/sh

echo "deploy start"

cd /Users/linyangping/Desktop/campusshare

echo "mvn clean ..."

mvn clean

echo "mvn install ..."

mvn install -P prod

echo "stop remote server ..."

ssh aliyun1 "sh /home/campusshare/backend/stop.sh"

echo "upload to server ..."

scp /Users/linyangping/Desktop/campusshare/target/campusshare.jar aliyun1:/home/campusshare/backend/

echo "start remote server ..."

ssh aliyun1 "cd /home/campusshare/backend ; sh start.sh"

echo "deploy end"


